package com.newopenlab.hmc.util.stats;

import java.util.List;

import com.newopenlab.hmc.biz.Action;
import com.newopenlab.hmc.util.BaseHand;
import com.newopenlab.hmc.util.IPHSManager;
import com.newopenlab.hmc.util.Way;
import com.newopenlab.hmc.util.WayAction;

public class PFRManager implements IPHSManager{

	@Override
	public BaseHand calculateStats(String playerName, BaseHand hand) {
		BaseHand bh=hand;
		List<WayAction> actions=null;
		bh=StatsUtil.initStat(playerName,bh);
		
		actions=StatsUtil.filterBetsGTZ(playerName,bh,new String[]{Action.RAISE.toString()},new String[]{Way.PREFLOP.toString()});
		if(actions.size()>0){
			bh.stats.get(playerName).pfRaise=actions.size();
			bh.stats.get(playerName).pfrFlag=true;
		}
		
		return bh;
	}

}

